<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue.js"></script>
</head>

<body>
    <div id="app">
        <button type="button" v-bind:title="title">按钮</button>
        <input type="text" v-bind:value="msg">
        <!-- v-bind 可以被简写为: -->
        <input type="text" :value="value">

        <button v-on:click="show">v-on测试</button>
        <button v-on:mouseover="hover">v-on测试</button>
        <!-- v-on 可以简写为@ -->
        <button @click="show">v-on测试</button>
        <button @mouseover="hover">v-on测试</button>
    </div>
</body>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            msg: '消息',
            title: '标题',
            value: '值'
        },
        methods: {
            show: function () {
                alert("hello!")
            },
            hover: function () {
                alert("hover!")
            }
        }
    });
</script>

</html>